<?php
/***
 * 
 * @author GuoLong
 * 2014/12/25
 * 
 */

class homework_image extends Model {
	
	private $table="xdf_homework_image";
	private $fields=array("");
	//学生获取一次作业当中一道题的反馈详情
	public function getMyImageTotalByHomeworkFeedbackId($homework_feedback_id) {
		$sql="SELECT COUNT(*) as count FROM $this->table WHERE `homework_feedback_id`='$homework_feedback_id';";
// 		var_dump($sql);
		return $this->fetchRow($sql);		
	}
	public function addHomeworkImage($homework_feedback_id,$image_id){
		$sql="INSERT INTO $this->table (`homework_feedback_id`,`image_id`,`create_time`) 
		 VALUES('$homework_feedback_id','$image_id',NOW());";
		return $this->insert($sql);
	}
}
